package com.example.springboot.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author: wyb
 * @date: 2021/10/29 10:10
 * @describe:
 * @vision 1.0
 */
@Data
@ApiModel("用户实体VO")
public class User {
    @NotNull(message = "用户id不能为空")
    @ApiModelProperty(value = "用户id")
    private Long id;

    @NotNull(message = "用户账号不能为空")
    @Size(min = 6, max = 11, message = "账号长度必须是6-11个字符")
    @ApiModelProperty(value = "用户账号")
    private String account;

    @NotNull(message = "用户密码不能为空")
    @Size(min = 6, max = 11, message = "密码长度必须是6-16个字符")
    @ApiModelProperty(value = "用户密码")
    private String password;

    @NotNull(message = "用户邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @NotEmpty(message = "test不能为空")
    @JsonIgnore
    private String test;
//
//    @NotBlank(message = "test2不能为空")
//    private String test2;
//
//    @NotNull(message = "test3不能为空")
//    private String test3;
}
